﻿using System.ComponentModel;
using System.Collections.ObjectModel;

namespace StartupSolution.ViewModel
{
    public class Category : BaseViewModel
    {
        private int categoryID;
        private string categoryName;
        private string description;
        private ObservableCollection<Stock> stocks;


        public int CategoryID
        {
            get
            {
                return this.categoryID;
            }
            set
            {
                if (this.categoryID != value)
                {
                    this.categoryID = value;
                    OnPropertyChanged("CategoryID");
                }
            }
        }

        public string CategoryName
        {
            get
            {
                return this.categoryName;
            }
            set
            {
                if (this.categoryName != value)
                {
                    this.categoryName = value;
                    OnPropertyChanged("CategoryName");
                }
            }
        }

        public string Description
        {
            get
            {
                return this.description;
            }
            set
            {
                if (this.description != value)
                {
                    this.description = value;
                    OnPropertyChanged("Description");
                }
            }
        }

        public ObservableCollection<Stock> Stocks
        {
            get
            {
                if (stocks == null)
                {
                    stocks = new ObservableCollection<Stock>();
                }

                return this.stocks;
            }
        }
    }
}